########################################################
# THESE VARIABLE MAYBE CHANGED BY THE USER AS DESIRED
# IMPORTANT: Follow Python Syntax to avoid syntax error
#	(change at your own risk and backup original)
########################################################

test_DB = "CS143"
user = "cs143"
      
             
# timeout time for each mysql command (in seconds)
timeout = 15                                                                     
  
student_id = 0
submission_folder = "submissions"                            

# name of create and load scripts submitted by students
# (this is submitted by the students and name should be given in the project specification)
create_script = "create.sql"
load_script = "load.sql"
query_script = "queries.sql"    

# temporary grading sql file
tmpSQL_file = "tmp.sql"
                                        

# Number of queries submitted by student
# if changing value, adjust the way points are assigned accordingly
num_queries = 3

# this is the name of the UCLA MyGradebook compatible file
# the verbose result is printer to stdout and can be logged using redirection (>)
# note: the violate.sql script is not tested here, it must be checked manually
results_dir = "RESULTS"
result_file = results_dir + "/gradebook.txt"    

#Gradebook header
header = "SID\tCREATE_SCORE\tLOAD_SCORE\tQRY_RUN_SCORE\tNUM_QUERY=3\tCASE_QUERY1\tCASE_QUERY2\tTotal(60)\tCOMMENTS\n"
#                  0                1            2                  3          4           5       6
# This script tests the output for 2 queries provided by grader here
# if changing the number of queries, please edit code accordingly   
queries_dir = "TESTCASES"
query1_file = queries_dir + "/test_query1.sql"
query2_file = queries_dir + "/test_query2.sql"
graders_query1_output = queries_dir + "/out_q1.txt"
graders_query2_output = queries_dir + "/out_q2.txt"      
   

# test PHP page
enable_PHP_testing = 0   

submission_path = "http://192.168.56.20/~cs143/"
test_submission_abs = "/home/cs143/www/"
query_parameter = 'query'
php_test_folder = "1b/"
php_test_file  = "query.php"

# query and solution used to test PHP page

php_test_query1 = 'select count(*) from (select aid from MovieActor group by aid having count(mid) > 1) as t'
php_test_query_sol1 = '4824'

php_test_query2 = ''
php_test_query_sol2 = ''      
              
php_test_query = [php_test_query1]
php_test_query_sol = [php_test_query_sol1]


################# POINT VALUES ######################
#create ran successfully
create_pts = 10

#load ran successfully
load_pts = 10    

#query script ran unsuccessfully
query_pts = -10

#query1 - correct output/no errors 
query1_pts = 20

#query2 - correct output/no errors 
query2_pts = 20
         
#PHP testing - point for 1 test query      
php_point = 10

######################################################
# THESE VARIABLE SHOULD NOT BE CHANGED BY THE USER
# (edit at your own risk)
########################################################
                                          
drop_DB_script = "./SCRIPTS/dropDB.sql"
create_DB_script = "./SCRIPTS/createDB.sql"
                                                    


